home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
music
/
5mods_1.arj
/
SMURF02.MOD
< prev
next >
Wrap
Text File
|
1994-01-09
|
8KB
|
194 lines
Papa Smurf #1 @29969
Sat Jan 08 11:17:03 1994
0R: net34: @2050 (via @1040) [15:40 01/08/94]
0R: net33: @1040 (via @1050) [16:02 01/08/94]
0R: net33: @19995 (via @29969) [11:14 01/08/94]
0R: net33: @29969 [11:17 01/08/94]
┌────────────────────────────────────────────────────────────────────────────┐
│ Mod Name : SMURF02.MOD Mod Author: PAPA SMURF 1@29969 WWIVnet │
│ Difficulty : █▒▒▒▒▒▒▒▒▒ 1@2000 FIITAnet │
│ WWIV Version : 4.23 │
│ Mod Date : 1/8/93 │
│ Files Affected: LILO.C NEWUSER.C FCNS.H │
│ Description : Ask user if they would like adult access, age permitting. │
│ Send SSM to Sysop of new user ADULT status/request. │
└────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────┐
│ == Existing Code │
│ =+ Change Code │
│ ++ Add This Code │
│ -- Delete This Code │
└─────────────────────────┘
══[ Long Description ]════════════════════════════════════════════════════════
This is a total rewrite of FOXX02.mod and SMURF01.mod. IF you have either
of these two installed, please delete them and use only this one if you like
the changes. (Make sure to *delete* the call to input_adult() in NEWUSER.C
as it will be called only from LILO.C) There is a *FIX* in here for
SMURF01.mod where I mis-spelled something. The old SMURF01.mod gave a -1 for
user number sometimes and that is fixed now.
Watch for lines that say //WRAPPED
You must unwrap them.
I wrote this mod because my board is mostly an adult board. If the user is
over the age of 17 it ask if they would like adult access on your system, if
they answer yes it then prints the terms of adult access and ask the user to
agree to the terms, then writes reply to thisuser.note.
══[ The Mod ]═════════════════════════════════════════════════════════════
Step 1: Back-up the source ;)
Step 2: Load up FCNS.H
<* Add the following to the FCNS.H file before void input_dataphone(void) *>
<* if you do not have FOXX02.MOD installed else skip this step *>
== /* File: newuser.c */
++ void input_adult(void);
Save and Close FCNS.H.....................
Step 3: Load up NEWUSER.C
<* Delete the following after input_screensize(); if you have FOXX02.mod *>
<* installed already if not then skip this step. *>
== input_age(&thisuser);
== input_comptype();
== input_screensize();
-- input_adult(void);
Step 4: Load up NEWUSER.C
<* ++Add (block copy) the following to the end of the NEWUSER.C file *>
<* delete the old input_adult(void) if you have it and replace it. *>
void input_adult(void)
{
char s1[7],s2[81];
if (thisuser.age>17) {
nl();
npr("5Would you like adult access? ");0
if (yn()) {
outchr(12);
if (okansi) {
nl();
pl(" 6WARNING1!! 6WARNING1!! 6WARNING1!! 6WARNING1!! 6WA0
RNING1!! 6WARNING1!! 6WARNING1!!"); //WRAPPED0
printfile("ADULT.ANS");
} else {
pl(" WARNING!! WARNING!! WARNING!! WARNING!!
WARNING!! WARNING!! WARNING!!"); //WRAPPED
printfile("ADULT.MSG");
}
nl();
npr("5Type 2I AGREE 5to accept these terms.1: ");0
mpl(7);
input(s1,7);
if (!strcmp(s1,"I AGREE")) {
strcpy(thisuser.note,"AGREED TO ADULT TERMS");
sprintf(s2,"%s %s & Wants Adult Access. Age:
%d",nam(&thisuser, usernum),thisuser.note,thisuser.age); //WRAPPED
ssm(1,0,s2);
nl();
return;
} else {
strcpy(thisuser.note,"DID NOT AGREE TO ADULT TERMS");
pl("5If you made a mistake or would like to request adult");0
npr("5access at another time1, 5email 2%s1.\r\n",syscfg.0
sysopname); //WRAPPED
sprintf(s2,"%s %s & Dosn't want Adult Access. Age: %d",nam(&thisuser
,usernum),thisuser.note,thisuser.age); //WRAPPED
ssm(1,0,s2);
nl();
return;
}
}
strcpy(thisuser.note,"DID NOT AGREE TO ADULT TERMS");
pl("5If you made a mistake or would like to request adult");0
npr("5access at another time1, 5email 2%s1.\r\n",syscfg.0sysopname);
sprintf(s2,"%s %s & Dosn't want Adult Access. Age: %d",nam(&thisuser
,usernum),thisuser.note,thisuser.age); //WRAPPED
ssm(1,0,s2);
nl();
return;
}
strcpy(thisuser.note,"MINOR - NO ADULT ACCESS");
sprintf(s2,"%s is a %s. Age: %d",nam(&thisuser,usernum),thisuser.note,
thisuser.age); //WRAPPED
ssm(1,0,s2);
nl();
}
Save and Close NEWUSER.C....................
Step 5: Load up LILO.C
<* Search for the following in the LILO.C file *>
== void logon(void)
== {
<* Then add the s3 variable *>
=+ char s[255],s1[181],s2[81],s3[60],*ss; // add s3[60] for SMURF02.MOD
<* A little further down Search for the following *>
== if (thisuser.waiting) {
== prt(5,get_string(377));
== if (yn())
== readmail();
== }
<* Then ++ADD (block copy) the following after that closed bracket *>
<* Delete the old code for SMURF01.mod if you have it and replace *>
/*************************************************************************/
// Determine if the users NOTE is equal to either of the three catagories
// and if not then validate them for the adult section. This will validate
// all users for ADULT ACCESS. This updates old records so that you the
// Sysop can prove that all Adult Access users have agreed with your
// requirements. Remember that if you install this mod, input_adult() will
// rewrite the old users note with Adult status..... *(New SMURF01.mod)*
strcpy(s3,thisuser.note);
if((!strcmp(s3,"AGREED TO ADULT TERMS")) || (!strcmp(s3,"DID NOT AGREE
TO ADULT TERMS")) || (!strcmp(s3,"MINOR - NO ADULT ACCESS"))) { //WRAPPED
nl();
npr("5Your Adult Status is: 2%s1.\r\n",s3);0
} else {
nl();
prt(4,"You are now being validated for the Adult Section.");
nl();
pausescr();
if(thisuser.age<18) {
prt(4,"Sorry, had to update the records and you did not
qualify."); //WRAPPED
nl();
input_adult();
} else {
nl();
input_adult();
}
}
Save and Close LILO.C.....................
Step 6: Exit Editor and TYPE MAKE and because FCNS.H was modified, it will
have to recompile the whole BBS :( so go get someting to snack on.
══[ Disclaimer ]══════════════════════════════════════════════════════════════
Not responsible for HD crashes or anything else...
Full Credit goes to FOXX 1@4907 WWIVnet for origional writting input_adult()
All other Credit goes to Papa Smurf 1@29969 WWIVnet for putting it all
togeather.